<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<script src="/Pans/login/public.js"></script>
	<script>document.write(write_icon());</script>
	<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
	<title>自定义纯色</title>
	<link href="css/bootstrap.css" rel="stylesheet">
</head>
<body style="background-color: #000000;align-content: center;" onload="showModal()">
	<div class="container">
		<div id="colorModal" class="modal hide fade in" style="display: none;width: 400px;">
			<div class="modal-header">
				<a class="close" data-dismiss="modal">×</a>
				<h3>请输入颜色，确认后如需修改请刷新</h3>
			</div>
			<div class="modal-body">
				<h4>请输入颜色(16进制)，以#开头，例如：#ffffff</h4>
				
				<input type="text" class="form-control" id="inputColor" placeholder="请输入颜色(16进制)">
				<p>
					
					<a href="../../color/" target="_blank">颜色参考链接</a>
				</p>
			</div>
			<div class="modal-footer">
				<a href="javascript:void(0)" onclick="setColor()" class="btn btn-success">确认</a>
				<a href="javascript:void(0)" class="btn" data-dismiss="modal">关闭</a>
			</div>
		</div>
	</div>
	<script src="js/jquery.js"></script>
	<script src="js/bootstrap-modal.js"></script>
</body>
<script>
	function showModal(){
		$('#colorModal').modal('show');
	}
	function setColor(){
		let inputColor=document.getElementById("inputColor").value;
		if(inputColor!=""){
			document.body.style.backgroundColor=inputColor;
			$('#colorModal').modal('hide');
		}
	}
</script>
</html>
